package hfjava;

public class demo_5 {
    public static void main(String[] args) {
        int[] price={3000,3150,2900,2950};
        for (int i =0;i<price.length;i++) {
            System.out.println("第"+(i+1)+"家价格为："+price[i]);
        }
        int min=price[0];
        for (int i = 1; i <price.length ; i++) {
          if (min>price[i]){
              min=price[i];
          }
        }
        System.out.println("最低价格："+min);
    }
}
